﻿@{
    ViewBag.Title = "Műszernapló";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using ELTE.SEM.Data.ViewModels

@model List<SEMLogEntryViewModel>
<div id="log-entry-container">
    <script type="text/javascript" src="/Scripts/Page/SemLog/Index.js"></script>
    @{
        <div class="two-folded log-left">
            @Html.Partial("MButton",new Tuple<string,string>("btn-add-log-entry","Új bejegyzés hozzáadása"))
            @*<div id="btn-add-log-entry" class="green-button">
                <div>Új bejegyzés hozzáadása</div>
            </div>*@
            <div id="log-entry-filter-container">
                @Html.Partial("_LogEntryFilter")
            </div>
        </div>
        <div class="two-folded log-main">

            <div id="log-entries">
                @if (Model != null && Model.Count > 0)
                {
                    foreach (var entry in Model)
                    {
                        @Html.Partial("_LogEntryPartial", entry)
                    }
                }
                else
                {
                    <div class="no-data">
                        Nincsenek bejegyzések
                    </div>
                }
            </div>

        </div>
        <div class="invisible">
            @Html.Partial("_AddLogEntry", new SEMLogEntryViewModel())
        </div>
        <div class="invisible">
            @Html.Partial("_AddLogEntryPart", new SEMLogEntryPartViewModel())
        </div>
        <div class="invisible">
            @Html.Partial("_CloseLogEntryPartial")
        </div>
        <div class="invisible">
            @Html.Partial("_EditLogEntryPart", new SEMLogEntryPartViewModel())
        </div>
    }
</div>


